package com.zfast.yugioh.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zfast.forge.valid.Create;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;


/**
 * 卡牌
 *
 * @author zgn
 * @email 
 * @date 2022-06-10 15:16:47
 */
@Data
@SuperBuilder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_ygo_card")
@ApiModel(value = "Card", description = "卡牌")
public class Card implements Serializable{
    private static final long serialVersionUID=1L;

    @Id
    @Column(name = "id")
    @ApiModelProperty("主键")
    @NotNull(message = "主键不可为空", groups = {Create.class})
    private Integer id;

    @Column(name = "name")
    @ApiModelProperty("名称")
    @NotNull(message = "名称不可为空", groups = {Create.class})
    private String name;

    @Column(name = "kind")
    @ApiModelProperty("类型(怪,魔,限)")
    @NotNull(message = "类型(怪,魔,限)不可为空", groups = {Create.class})
    private Integer kind;

    @Column(name = "type")
    @ApiModelProperty("分类(通常or特殊)")
    @NotNull(message = "分类(通常or特殊)不可为空", groups = {Create.class})
    private Integer type;

    @Column(name = "speed")
    @ApiModelProperty("速度")
    @NotNull(message = "速度不可为空", groups = {Create.class})
    private Integer speed;

    @Column(name = "effects")
    @ApiModelProperty("效果")
    private String effects;

    @Column(name = "decs")
    @ApiModelProperty("描述/以下是怪兽卡")
    @NotNull(message = "描述/以下是怪兽卡不可为空", groups = {Create.class})
    private String decs;

    @Column(name = "attribute")
    @ApiModelProperty("属性")
    private Integer attribute;

    @Column(name = "race")
    @ApiModelProperty("种族")
    private Integer race;

    @Column(name = "level")
    @ApiModelProperty("等级")
    private Integer level;

    @Column(name = "attack")
    @ApiModelProperty("攻击力")
    private Integer attack;

    @Column(name = "defend")
    @ApiModelProperty("防御力")
    private Integer defend;

    @Column(name = "features")
    @ApiModelProperty("默认特性/以下是特性")
    @NotNull(message = "默认特性/以下是特性不可为空", groups = {Create.class})
    private Integer features;

    @Column(name = "dialogue")
    @ApiModelProperty("默认登场对话")
    private String dialogue;

    @Column(name = "create_date")
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;

    @Column(name = "create_name")
    @ApiModelProperty("创建人")
    private String createName;

    @Column(name = "create_id")
    @ApiModelProperty("创建人主键")
    private Integer createId;

    @Column(name = "update_date")
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateDate;

    @Column(name = "update_name")
    @ApiModelProperty("更新人")
    private String updateName;

    @Column(name = "update_id")
    @ApiModelProperty("更新人主键")
    private Integer updateId;

    @Column(name = "enable_flag")
    @ApiModelProperty("删除标志0:无;1有")
    private Boolean enableFlag;

    @Transient
    @ApiModelProperty("模糊查询字段")
    private String whe;
}
